(function(cjs,as){
	(as.RadioGroup=function(){
		var self=this;
		this.EventDispatcher_constructor();
		
		this._index=-1;
		
		var radio_list=Array.from(arguments);
		if(arguments.length>0){
			for(var i=0;i<arguments.length;i++){
				arguments[i].on('select',selectHandler,null,false);
			}
		}
		function selectHandler(e){
			//console.log(e);
			//console.log(typeof(radio_list));
			//发送事件
			var evt=new cjs.Event('change');
			evt.data={item:e.target,index:radio_list.indexOf(e.target)};
			self.dispatchEvent(evt);
		}
		this.reset=function(){
			for(i=0;i<radio_list.length;i++){
				radio_list[i].select=false;
			}
			if(this._index>-1){
				radio_list[this._index].select=true;
			}
		};
		this.reset();
	});
	var p = cjs.extend(as.RadioGroup, cjs.EventDispatcher);
	p._get_selectIndex=function(){
		return this._index;
	};
	p._set_selectIndex=function(value){
		this._index=value;
		this.reset();
	};
	try {
		Object.defineProperties(p, {
			selectIndex: { get: p._get_selectIndex, set: p._set_selectIndex }
		});
	} catch (e) {}
	as.RadioGroup = cjs.promote(as.RadioGroup, "EventDispatcher");
})(createjs = createjs||{}, ascainiao = ascainiao||{});
var createjs, ascainiao;